of

public static ByteData of(String data)

Creates an instance of ByteData with the given upload data bytes.

The bytes are retrieved from the data string using the getBytes method with the UTF-8 charset.


public static ByteData of(Array<byte> data)

Creates an instance of ByteData with the given upload data bytes.


public static ByteData of(String data, ContentType contentType)

Creates an instance of ByteData with the given upload data bytes and content type.

The bytes are retrieved from the data string using the getBytes method with the UTF-8 charset.

Since

7.33


public static ByteData of(Array<byte> data, ContentType contentType)

Creates an instance of ByteData with the given upload data bytes and content type.

Since

7.33